package com.winter.boot.event;

import java.util.*;

public class EventBroadcaster {

    private final List<Listener> listeners = new ArrayList<>();

    public void event(Event event) {

        for (Listener listener : listeners) {
            listener.event(event);
        }
    }

    public void addListeners(Listener listener) {
         listeners.add(listener);
    }
}
